package riki.org.test;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;




public class JavaMain {
	public static void main(String[] args) throws Exception
	{
		traceln("test");
		//test t1 = new ClassManager().getFileClass("test");
		//t1.trace("aaaaaaaaaa");
		//new TestTime().init();
		//testError();
		testError();
		test1();
	}
	
	//============================================================
	public static void traceln(String s)
	{
		DateFormat myFormat = new SimpleDateFormat("hh:mm:ss");
		String myData       = myFormat.format(new Date());
		System.out.println("["+myData+"]->"+s);
		
	}
	
	public static void test1()
	{
		int[] a = new int[10];
		a[0]	=	1;
		traceln("l:"+a.length);
	}
	
	public static void testError()
	{
		try
		{
			Class	curTestClass	= Class.forName("jj");
		}
		catch (Exception e) {
			int			errorSize	=	e.getStackTrace().length;
			String		errorStr	=	"";
			
			for(int i = 0 ; i < errorSize ; i ++)
			{
				errorStr+=e.getStackTrace()[i]+"\n";
			}
			
			traceln("ErrorMessage:\n"+e.fillInStackTrace()+"\n"+errorStr);
			e.printStackTrace();
		}
	}
}
